<?php

/**
 * Created by PhpStorm.
 * User: hantian
 * Date: 2017/10/23
 * Time: 上午10:42
 */
use link1st\Easemob\App\Easemob;


class EasemobService
{
    const ACTION_NOTICE = 'action_notice';

    public static function publicRegistration($name, $password = '', $nick_name = "")
    {
        return Easemob::publicRegistration($name, $password, $nick_name);
    }

    //透传消息
    public static function sendMessagePNS($users, $target_type = 'users', $action_type = "", $send_user = 'admin')
    {
        switch ($action_type) {
            case 1:
                $action = self::ACTION_NOTICE;
                break;
            default:
                $action = "";
        }
        return Easemob::sendMessagePNS($users, $target_type = 'users', $action = "", $send_user = 'admin');
    }
}
